const express = require("express");
const router = express.Router();
// 检验器
const { getCompanyNewsList_validation, getCompanyNewsDetail_validation, editCompanyNews_validation } = require("../validators/companyNews");
// 控制器
const { getCompanyNewsList, getCompanyNewsDetail, editCompanyNews, deleteCompanyNews } = require("../controllers/companyNews");

router.get("/getCompanyNewsList", getCompanyNewsList_validation, getCompanyNewsList); // 新闻资讯列表
router.get("/getCompanyNewsDetail", getCompanyNewsDetail_validation, getCompanyNewsDetail); // 新闻资讯详情
router.post("/editCompanyNews", editCompanyNews_validation, editCompanyNews); // 添加新闻资讯
router.delete("/deleteCompanyNews", getCompanyNewsDetail_validation, deleteCompanyNews); // 删除新闻资讯

module.exports = router;
